<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <style>
    body {
      margin: 0;
      padding: 0;
      background-color: #87CEEB;
      /* 浅蓝色背景 */
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
      /* 让页面主体占满整个视口高度，以便垂直居中 */
    }

    .container {
      width: 400px;
      /* 增大宽度 100 像素 */
      height: 300px;
      /* 适当增加高度 */
      margin: 0 auto;
      padding: 20px;
      background-color: #FFFFFF;
      border-radius: 5px;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    }

    h1 {
      text-align: center;
      /* 标题水平居中 */
      color: #0074D9;
      /* 与浅蓝色背景搭配的较深颜色 */
    }

    input[type="text"],
    input[type="password"] {
      width: 100%;
      padding: 10px;
      margin-bottom: 10px;
      border: 1px solid #ccc;
      border-radius: 3px;
    }

    .buttons {
      display: flex;
      justify-content: space-between;
    }

    button {
      padding: 10px 20px;
      border: none;
      border-radius: 3px;
      background-color: #0074D9;
      /* 与浅蓝色背景搭配的较深颜色 */
      color: #FFFFFF;
      cursor: pointer;
    }

    .admin-button {
      width: 100%;
      padding: 10px;
      border: none;
      border-radius: 3px;
      background-color: #FF4136;
      /* 管理员按钮不同颜色 */
      color: #FFFFFF;
      cursor: pointer;
      margin-top: 10px;
    }
  </style>
</head>

<body>
<div class="container">
  <h1>数字资产交易网站</h1>
  <input type="text" placeholder="账号">
  <input type="password" placeholder="密码">
  <div class="buttons">
    <button>登录</button>
    <button>注册</button>
  </div>
  <button class="admin-button">管理员注册</button>
</div>
</body>

</html>



<!--
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>瑞吉外卖管理端</title>
  <link rel="shortcut icon" href="../../favicon.ico">
  &lt;!&ndash; 引入样式 &ndash;&gt;
  <link rel="stylesheet" href="../../plugins/element-ui/index.css" />
  <link rel="stylesheet" href="../../styles/common.css">
  <link rel="stylesheet" href="../../styles/login.css">
  <link rel="stylesheet" href="../../styles/icon/iconfont.css" />
  <style>
    .body{
      min-width: 1366px;
    }
  </style>
</head> 

<body>
  <div class="login" id="login-app">
    <div class="login-box">
      <img src="../../images/login/login-l.png" alt="">
      <div class="login-form">
        <el-form ref="loginForm" :model="loginForm" :rules="loginRules" >
          <div class="login-form-title">
            <img src="../../images/login/logo.png" style="width:139px;height:42px;" alt="" />
          </div>
          <el-form-item prop="username">
            <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号" maxlength="20"
              prefix-icon="iconfont icon-user" />
          </el-form-item>
          <el-form-item prop="password">
            <el-input v-model="loginForm.password" type="password" placeholder="密码" prefix-icon="iconfont icon-lock" maxlength="20"
              @keyup.enter.native="handleLogin" />
          </el-form-item>
          <el-form-item style="width:100%;">
            <el-button :loading="loading" class="login-btn" size="medium" type="primary" style="width:100%;"
              @click.native.prevent="handleLogin">
              <span v-if="!loading">登录</span>
              <span v-else>登录中...</span>
            </el-button>
          </el-form-item>
        </el-form>
      </div>
    </div>
  </div>

  &lt;!&ndash; 开发环境版本，包含了有帮助的命令行警告 &ndash;&gt;
  <script src="../../plugins/vue/vue.js"></script>
  &lt;!&ndash; 引入组件库 &ndash;&gt;
  <script src="../../plugins/element-ui/index.js"></script>
  &lt;!&ndash; 引入axios &ndash;&gt;
  <script src="../../plugins/axios/axios.min.js"></script>
  <script src="../../js/request.js"></script>
  <script src="../../js/validate.js"></script>
  <script src="../../api/login.js"></script>

  <script>
    new Vue({
      el: '#login-app',
      data() {
        return {
          loginForm:{
            username: 'admin',
            password: '123456'
          },
          loading: false
        }
      },
      computed: {
        loginRules() {
          const validateUsername = (rule, value, callback) => {
            if (value.length < 1 ) {
              callback(new Error('请输入用户名'))
            } else {
              callback()
            }
          }
          const validatePassword = (rule, value, callback) => {
            if (value.length < 6) {
              callback(new Error('密码必须在6位以上'))
            } else {
              callback()
            }
          }
          return {
            'username': [{ 'validator': validateUsername, 'trigger': 'blur' }],
            'password': [{ 'validator': validatePassword, 'trigger': 'blur' }]
          }
        }
      },
      created() {
      },
      methods: {
        async handleLogin() {
          this.$refs.loginForm.validate(async (valid) => {
            if (valid) {
              this.loading = true
              let res = await loginApi(this.loginForm)
              if (String(res.code) === '1') {//1表示登录成功
                localStorage.setItem('userInfo',JSON.stringify(res.data))
                window.location.href= '/backend/index.html'
              } else {
                this.$message.error(res.msg)
                this.loading = false
              }
            }
          })
        }
      }
    })
  </script>
</body>

</html>
-->
